package com.jk.service.impl;

import com.jk.bean.GouMaiWenZhang;
import com.jk.bean.GuangGao;
import com.jk.mapper.GuangGaoMapper;
import com.jk.service.GuangGaoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class GuangGaoServiceImpl implements GuangGaoService {

    @Resource
    private GuangGaoMapper  GuangGaoMapper;
    @Override
    public List<GuangGao> queryGuanGao() {
        return GuangGaoMapper.queryGuanGao();
    }

    @Override
    public Integer gouMaiWZ(String  userid,String  tableName,String  wzid) {
        GuangGaoMapper.gouMaiWZ(userid);
        GuangGaoMapper.addWenZhangJiLu(userid,tableName,wzid);
        return GuangGaoMapper.queryJiFen(userid);
    }

    @Override
    public GouMaiWenZhang queryShiFouGouMai(String userid, String tableName, String wzid) {
        return GuangGaoMapper.queryShiFouGouMai(userid,tableName,wzid);
    }
}
